package dongshi.daddy;

import dongshi.daddy.dao.UserDao;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import javax.annotation.Resource;

@SpringBootApplication
public class SpringJdbcApplication implements ApplicationRunner {

    public static void main(String[] args) {
        SpringApplication.run(SpringJdbcApplication.class, args);
    }

    @Resource
    private UserDao userDao;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        userDao.addUser();
    }
}
